<?php
class NewsModel extends RelationModel{
    public $table='news';
    public $relation=array(
        'news_data'=>array(
            'type'=>HAS_ONE,
            'foreign_key'=>"nid",
            'parent_key'=>'id'
        )
    );

}